import { createApp,ref,reactive,onMounted,watch } from 'vue'
import '@/style.css'
import App from '@/App.vue'
import router from '@/router/index'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import permission from "@/util/permission.js";
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/theme-chalk/dark/css-vars.css'
import IconPicker from "@/components/IconPicker.vue";



import {initDict} from "@/util/dict.js";
const app = createApp(App)
app.use(router)
app.use(ElementPlus)
app.use(initDict)
app.component("IconPicker",IconPicker)
app.directive("permission",permission)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.config.globalProperties.$ref = ref;
app.config.globalProperties.$reactive = reactive;
app.config.globalProperties.$onMounted = onMounted;
app.config.globalProperties.$watch = watch;
app.mount('#app')
